#ifndef PLAYER_H
#define PLAYER_H

#include "Heightmap.h"


enum ESelectedTower
{
	None,
	BasicTower,
	SlowingTower,
};

class Grid;
class InputManager;
class EntityManager;
class EntityFactory;
class GameGUI;
class Player
{
public:
	Player(InputManager* input_manager, EntityManager* entity_manager, EntityFactory* entity_factory, GameGUI* game_gui, Heightmap::Vertex* terrain_vertices, Grid* grid);
	virtual ~Player(void);

	void AddGold(unsigned int value);
	bool PurchaseTower();
	void Update(Vector3 hit);


private:
	void Pick(float x, float y);

private:
	Heightmap::Vertex* m_terrain_vertices;
	InputManager* m_input_manager;
	EntityManager* m_entity_manager;
	EntityFactory* m_entity_factory;
	GameGUI* m_game_gui;

	Grid* m_grid;

	Vector3 m_raycast_hit;
	ESelectedTower m_selected_tower;

	unsigned int m_gold;

	const unsigned int BasicTowerPrice;
	const unsigned int SlowingTowerPrice;
};

#endif //PLAYER_H